<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="stylesheet/style.css">
<title>Movie Detail Page</title>
</head>
<body>
	<div style="width:900px;margin:auto;border:0px solid black;">
		
		<jsp:include page="../common/header.jsp"/>
		<div style="height:5px;">
			<!-- Spacer -->
		</div>
		<div id="content">
			<s:form method="post" action="update_movie_view.action" >
			<table>
				<tr>
					<td>Id</td>
					<td><s:property value="%{movie.id}"/> </td>
				</tr>
				<tr>
					<td>Title</td>
					<td><s:property value="%{movie.title}"/> </td>
				</tr>
				<tr>
					<td>Genre</td>
					<td><s:property value="%{movie.genre.name}"/> </td>
				</tr>
				<tr>
					<td>Summary</td>
					<td><s:property value="%{movie.summary}"/></td>
				</tr>
				
			</table>
			<div style="text-align:right;">
				<s:if test="%{#session.loginUser.username == 'admin'}">
					<input type="submit" value="Edit" name="action"/>
					<input type="submit" value="Delete" name="action"/>
				</s:if>
				<input type="submit" value="Go To List" name="action" />
			</div>
			</s:form>
		</div>
		<div style="height:5px;">
			<!-- Spacer -->
		</div>
		<jsp:include page="../common/footer.jsp"/>
	</div>
</body>
</html>